import Mock from 'mockjs';
import setupMock, { successResponseWrap } from '@/utils/setup-mock';

setupMock({
  setup() {
    Mock.mock(new RegExp('/auth/perm/list'), () => {
      return successResponseWrap({
        list: [
          {
            id: 1,
            code: "A000000000",
            name: "标注管理",
            childs: [
              {
                id: 3,
                code: "A010000000",
                name: "标注模块",
                childs: [
                  {
                    id: 1,
                    code: "A010100000",
                    name: "标注模块",
                    childs: [
                      {
                        id: 4,
                        code: "A010101000",
                        name: "标注任务",
                        childs: [
                          {
                            id: 1,
                            code: "A010101001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A010101002",
                            name: "查询/重置"
                          },
                          {
                            id: 3,
                            code: "A010101003",
                            name: "新建"
                          },
                          {
                            id: 4,
                            code: "A010101004",
                            name: "操作/查看"
                          },
                          {
                            id: 5,
                            code: "A010101005",
                            name: "操作/编辑"
                          },
                          {
                            id: 6,
                            code: "A010101006",
                            name: "操作/发布"
                          },
                          {
                            id: 7,
                            code: "A010101007",
                            name: "操作/终结"
                          },
                          {
                            id: 8,
                            code: "A010101008",
                            name: "操作/复制"
                          },
                          {
                            id: 9,
                            code: "A010101009",
                            name: "操作/删除"
                          },
                          {
                            id: 10,
                            code: "A010101010",
                            name: "操作/查看序列详情"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                id: 5,
                code: "A020000000",
                name: "用户中心",
                childs: [
                  {
                    id: 6,
                    code: "A020100000",
                    name: "账户管理",
                    childs: [
                      {
                        id: 1,
                        code: "A020101000",
                        name: "账户管理",
                        childs: [
                          {
                            id: 1,
                            code: "A020101001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A020101002",
                            name: "新建单位"
                          },
                          {
                            id: 3,
                            code: "A020101003",
                            name: "查询/重置"
                          },
                          {
                            id: 4,
                            code: "A020101004",
                            name: "新建用户"
                          },
                          {
                            id: 5,
                            code: "A020101005",
                            name: "操作/编辑"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    id: 7,
                    code: "A020200000",
                    name: "角色管理",
                    childs: [
                      {
                        id: 8,
                        code: "A020201000",
                        name: "角色管理",
                        childs: [
                          {
                            id: 9,
                            code: "A020201001",
                            name: "列表"
                          },
                          {
                            id: 10,
                            code: "A020201002",
                            name: "新建单位"
                          },
                          {
                            id: 11,
                            code: "A020201003",
                            name: "查询/重置"
                          },
                          {
                            id: 12,
                            code: "A020201004",
                            name: "新建用户"
                          },
                          {
                            id: 13,
                            code: "A020201005",
                            name: "操作/编辑"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                id: 3,
                code: "A030000000",
                name: "数据导出",
                childs: [
                  {
                    id: 1,
                    code: "A030100000",
                    name: "标注结果",
                    childs: [
                      {
                        id: 1,
                        code: "A030101000",
                        name: "标注结果",
                        childs: [
                          {
                            id: 1,
                            code: "A030101001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A030101002",
                            name: "查询/重置"
                          },
                          {
                            id: 3,
                            code: "A030101003",
                            name: "导出"
                          },
                          {
                            id: 4,
                            code: "A030101004",
                            name: "批量导出"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    id: 2,
                    code: "A030200000",
                    name: "任务查询",
                    childs: [
                      {
                        id: 1,
                        code: "A030201000",
                        name: "任务查询",
                        childs: [
                          {
                            id: 1,
                            code: "A030201001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A030201002",
                            name: "一键导出"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                id: 4,
                code: "A040000000",
                name: "配置中心",
                childs: [
                  {
                    id: 1,
                    code: "A040100000",
                    name: "标注类型",
                    childs: [
                      {
                        id: 1,
                        code: "A040101000",
                        name: "标注类型",
                        childs: [
                          {
                            id: 1,
                            code: "A040101001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A040101002",
                            name: "查询/重置"
                          },
                          {
                            id: 3,
                            code: "A040101003",
                            name: "新建"
                          },
                          {
                            id: 4,
                            code: "A040101004",
                            name: "操作/编辑"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    id: 2,
                    code: "A040200000",
                    name: "标注组件",
                    childs: [
                      {
                        id: 1,
                        code: "A040201000",
                        name: "标注组件",
                        childs: [
                          {
                            id: 1,
                            code: "A040201001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A040201002",
                            name: "查询/重置"
                          },
                          {
                            id: 3,
                            code: "A040201003",
                            name: "新建"
                          },
                          {
                            id: 4,
                            code: "A040201004",
                            name: "操作/编辑"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    id: 3,
                    code: "A040300000",
                    name: "标注工具",
                    childs: [
                      {
                        id: 1,
                        code: "A040301000",
                        name: "标注工具",
                        childs: [
                          {
                            id: 1,
                            code: "A040301001",
                            name: "列表"
                          },
                          {
                            id: 2,
                            code: "A040301002",
                            name: "查询/重置"
                          },
                          {
                            id: 3,
                            code: "A040301003",
                            name: "新建"
                          },
                          {
                            id: 4,
                            code: "A040301004",
                            name: "操作/编辑"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    id: 4,
                    code: "A040400000",
                    name: "标注配置",
                    childs: [
                      {
                        id: 1,
                        code: "A040401000",
                        name: "科室",
                        childs: [
                          {
                            id: 1,
                            code: "A040401001",
                            name: "科室列表"
                          },
                          {
                            id: 2,
                            code: "A040401002",
                            name: "科室查询"
                          },
                          {
                            id: 3,
                            code: "A040401003",
                            name: "科室新建"
                          },
                          {
                            id: 4,
                            code: "A040401004",
                            name: "科室操作/编辑"
                          }
                        ]
                      },
                      {
                        id: 2,
                        code: "A040402000",
                        name: "任务标签",
                        childs: [
                          {
                            id: 1,
                            code: "A040402001",
                            name: "任务标签列表"
                          },
                          {
                            id: 2,
                            code: "A040402002",
                            name: "任务标签查询"
                          },
                          {
                            id: 3,
                            code: "A040402003",
                            name: "任务标签新建"
                          },
                          {
                            id: 4,
                            code: "A040402004",
                            name: "任务标签操作/编辑"
                          }
                        ]
                      },
                      {
                        id: 3,
                        code: "A040403000",
                        name: "任务目标",
                        childs: [
                          {
                            id: 1,
                            code: "A040403001",
                            name: "任务目标列表"
                          },
                          {
                            id: 2,
                            code: "A040403002",
                            name: "任务目标查询"
                          },
                          {
                            id: 3,
                            code: "A040403003",
                            name: "任务目标新建"
                          },
                          {
                            id: 4,
                            code: "A040403004",
                            name: "任务目标操作/编辑"
                          }
                        ]
                      },
                      {
                        id: 4,
                        code: "A040404000",
                        name: "任务用途",
                        childs: [
                          {
                            id: 1,
                            code: "A040404001",
                            name: "任务用途列表"
                          },
                          {
                            id: 2,
                            code: "A040404002",
                            name: "任务用途查询"
                          },
                          {
                            id: 3,
                            code: "A040404003",
                            name: "任务用途新建"
                          },
                          {
                            id: 4,
                            code: "A040404004",
                            name: "任务用途操作/编辑"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            id: 2,
            code: "B000000000",
            name: "标注权限",
            childs: [
              {
                id: 1,
                code: "B010000000",
                name: "标注医生端",
                childs: [
                  {
                    id: 1,
                    code: "B010100000",
                    name: "标注医生端",
                    childs: [
                      {
                        id: 1,
                        code: "B010101000",
                        name: "标注医生端",
                        childs: [
                          {
                            id: 1,
                            code: "B010101001",
                            name: "标注"
                          },
                          {
                            id: 2,
                            code: "B010101002",
                            name: "编辑"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      });
    });
  }
})